extends layout
block content
  .container
    form.form-horizontal(role='form')
      h4.form-title WEB发布工具
      .form-group
        label.col-xs-3.control-label 帐号
        .col-xs-9
          input#txtAccount.form-control.input-lg(type='text')
      .form-group
        label.col-xs-3.control-label 密码
        .col-xs-9
          input#txtPassword.form-control.input-lg(type='password')
      .form-group 
        .col-xs-offset-3.col-xs-9
          input#btnLogin.btn.btn-primary.pull-right.btn-lg(type='button',value='登录')
  script(type='text/javascript').
    $(document).ready(function(){        
      $("#btnLogin").click(function(){
        $.post('/login',{"account":$("#txtAccount").val(),"password":$("#txtPassword").val()},function(result){
          if(result.success){
            window.location = '/main';
          }else{
            alert(result.message);
          }
        });
      });
    });

